Soft-delete memory records by id [Cloud-only]
curl --request POST \
--url https://api.evermind.ai/api/v2/memory/delete_by_ids \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"memory_type": "episode",
"memory_ids": [
"665f0c8e1a2b3c4d5e6f7a8b",
"665f0c8e1a2b3c4d5e6f7a8c"
],
"reason": {
"code": "redundant"
}
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/delete_by_ids"
payload = {
"memory_type": "episode",
"memory_ids": ["665f0c8e1a2b3c4d5e6f7a8b", "665f0c8e1a2b3c4d5e6f7a8c"],
"reason": { "code": "redundant" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
memory_type: 'episode',
memory_ids: ['665f0c8e1a2b3c4d5e6f7a8b', '665f0c8e1a2b3c4d5e6f7a8c'],
reason: {code: 'redundant'}
})
};
fetch('https://api.evermind.ai/api/v2/memory/delete_by_ids', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/delete_by_ids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'memory_type' => 'episode',
'memory_ids' => [
'665f0c8e1a2b3c4d5e6f7a8b',
'665f0c8e1a2b3c4d5e6f7a8c'
],
'reason' => [
'code' => 'redundant'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/delete_by_ids"
payload := strings.NewReader("{\n \"memory_type\": \"episode\",\n \"memory_ids\": [\n \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"665f0c8e1a2b3c4d5e6f7a8c\"\n ],\n \"reason\": {\n \"code\": \"redundant\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/delete_by_ids")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"memory_type\": \"episode\",\n \"memory_ids\": [\n \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"665f0c8e1a2b3c4d5e6f7a8c\"\n ],\n \"reason\": {\n \"code\": \"redundant\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/delete_by_ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memory_type\": \"episode\",\n \"memory_ids\": [\n \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"665f0c8e1a2b3c4d5e6f7a8c\"\n ],\n \"reason\": {\n \"code\": \"redundant\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"memory_type": "<string>",
"success": true
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Memory
Soft-delete memory records by id [Cloud-only]
Soft-delete up to 50 memories chosen by id, together with what was derived from them (extracted facts, cluster membership and search-index copies). Only “episode” is supported today.
- Every id must be well-formed; one malformed id rejects the whole request with 422 and nothing is deleted.
- Ids that do not exist, are already deleted, or belong to another tenant are skipped rather than reported — the rest of the batch is still deleted, so re-sending a batch is safe. Duplicates are collapsed.
To remove memories by owner or session rather than by id, use /api/v2/memory/delete.
POST
/
api
/
v2
/
memory
/
delete_by_ids
Soft-delete memory records by id [Cloud-only]
curl --request POST \
--url https://api.evermind.ai/api/v2/memory/delete_by_ids \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"memory_type": "episode",
"memory_ids": [
"665f0c8e1a2b3c4d5e6f7a8b",
"665f0c8e1a2b3c4d5e6f7a8c"
],
"reason": {
"code": "redundant"
}
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/delete_by_ids"
payload = {
"memory_type": "episode",
"memory_ids": ["665f0c8e1a2b3c4d5e6f7a8b", "665f0c8e1a2b3c4d5e6f7a8c"],
"reason": { "code": "redundant" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
memory_type: 'episode',
memory_ids: ['665f0c8e1a2b3c4d5e6f7a8b', '665f0c8e1a2b3c4d5e6f7a8c'],
reason: {code: 'redundant'}
})
};
fetch('https://api.evermind.ai/api/v2/memory/delete_by_ids', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/delete_by_ids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'memory_type' => 'episode',
'memory_ids' => [
'665f0c8e1a2b3c4d5e6f7a8b',
'665f0c8e1a2b3c4d5e6f7a8c'
],
'reason' => [
'code' => 'redundant'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/delete_by_ids"
payload := strings.NewReader("{\n \"memory_type\": \"episode\",\n \"memory_ids\": [\n \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"665f0c8e1a2b3c4d5e6f7a8c\"\n ],\n \"reason\": {\n \"code\": \"redundant\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/delete_by_ids")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"memory_type\": \"episode\",\n \"memory_ids\": [\n \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"665f0c8e1a2b3c4d5e6f7a8c\"\n ],\n \"reason\": {\n \"code\": \"redundant\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/delete_by_ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memory_type\": \"episode\",\n \"memory_ids\": [\n \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"665f0c8e1a2b3c4d5e6f7a8c\"\n ],\n \"reason\": {\n \"code\": \"redundant\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"memory_type": "<string>",
"success": true
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
API key issued by EverOS, sent as Authorization: Bearer <api_key>.
Body
application/json
Soft-delete the named memory records [Cloud-only].
Kind of the memories being deleted. Only "episode" is accepted today.
Minimum string length:
11 to 50 memory ids. Every one must be well-formed; duplicates are collapsed.
Required array length:
1 - 50 elementsWhy the memories are removed. Optional; one reason covers the whole batch.
Show child attributes
Show child attributes
Was this page helpful?

